package guet.imagan.progbuilder;

import guet.imagan.progbuilder.annotation.InterpreteCommand;
import guet.imagan.util.ListUtil;

import java.util.List;

public abstract class DefaultInterpreter extends Interpreter{
	/**
	 * 根据项目对象，命令行程序运行参数，填充命令行中的占位符
	 *
	 * @param cmd     包含占位符的命令行
	 * @param project
	 */
	@Override
	public void populatePlaceholders(List<String> cmd, Project project) {
		ListUtil.replaceFirst(cmd,InterpreteCommand.main,project.resolveMain());
	}
}
